{% extends 'base_with_listing.html' %}

{% block title %}All reservations{% endblock %}

{% block header %} {% if for_whom %} {{ for_whom }} {% else %} Reservation archive{% endif %} {% endblock %}

{% block order %} [[1,0]] {% endblock %}
{% block itemsWrapper %}rsv_archive{% endblock %}

    {% block header_row %}
        <th>ID      </th>
        <th>Title   </th>
        <th>Authors  </th>
        <th>Start    </th>
        <th>End      </th>
        <th>Rented   </th>
        <th>Returned </th>
        <th>Notes    </th>
    {% endblock %}

    {% block item_row %}
        <td>
            {{ row.id  }}
        </td><td>
            {{ row.title }}
        </td><td>
            {% if row.authors %}{{ row.authors|join:', '}}{% endif %}
        </td><td>
            {{ row.reserved }}
        </td><td>
            {{ row.reservation_end }}
        </td><td>
            {% if row.rented %} {{ row.rented }} {% else %} --- {% endif %}
        </td><td>
            {% if row.returned %} {{ row.returned }} {% else %} --- {% endif %}
        </td><td>
            {% if row.cancelled %} {{ row.cancelled }} {% else %} --- {% endif %}
        </td>
    {% endblock %}
